package org.example.mqtexxt.mqserver.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.example.mqtexxt.mqserver.core.Binding;
import org.example.mqtexxt.mqserver.core.Exchange;
import org.example.mqtexxt.mqserver.core.MSGQueue;

import java.util.List;

@Mapper
public interface MetaMapper {

    void createExchangeTable();

    void createQueueTable();

    void createBindingTable();

    //分别编写交换机，队列，绑定的插入，删除，查找方法
    void insertExchange(Exchange exchange);
    void deleteExchange(String exchangeName);

    void insertQueue(MSGQueue queue);
    void deleteQueue(String queueName);

    void insertBinding(Binding binding);
    void deleteBinding(Binding binding);

    List<Exchange> selectAllExchanges();

    List<MSGQueue> selectAllQueues();

    List<Binding> selectAllBindings();

}
